# coding:utf-8

#tcp socket 服务器

import socket;

from multiprocessing import Process

socket = socket.socket();
socket.bind[];
socket.listen();
socket.accept();
while True:
    p = Process(target=fun,args=());
    p.start();
    cli_socket.close();

    #接受数据
    #request_data = recv()
    #print(request_data)
    #解析 http 报文数据 request_data
    #提取请求方式
    #提取请求路径
    #返回响应数据

    ###
     #http1.1 200 ok\r\n
     #\r\n
     #hello itcast()
    ###
    #send()
    #close
def fun(cli_socket):
    html_root_dir = "./html";
    try:
        file=open(html_root_dir+"/index.html");
    except IOError:
        print "not found!!!!";
    data = file.read();
    file.close();











































